package com.api.shopapi.service;

import com.alibaba.fastjson.JSONArray;
import com.api.shopapi.entity.GoodsClass;
import com.api.shopapi.entity.dto.GoodsClassDTO;
import com.github.pagehelper.PageInfo;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public interface GoodsClassService {

    int insert(GoodsClass goodsClass, JSONArray jsonArray);

    int delete(String goodsClassCode);

    int update(GoodsClass goodsClass,JSONArray jsonArray);

    GoodsClass getByGoodsClassCode(String goodsClassCode);

    GoodsClass getByName(String name);

    List<GoodsClass> getAllList();

    PageInfo<GoodsClass> getPageList(int pageIndex,int pageSize,String name,int status);

    List<GoodsClassDTO> getListByParentGoodsClassCode(String parentGoodsClassCode);

    List<GoodsClassDTO> getAllListByParentGoodsClassCode(String parentGoodsClassCode);

    PageInfo<GoodsClassDTO> getPageListByParentGoodsClassCode(int pageIndex,int pageSize,String name,String parentGoodsClassCode);


}
